package com.bjsxt.mapper;

import com.bjsxt.pojo.Duty;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.Date;
import java.util.List;

public interface DutyMapper {

    //用户签到的实现
    @Insert("insert into  duty  values(default,#{emprId},#{dtDate},#{signinTime},#{signoutTime})")
    int  insert(Duty duty);

    //查询用户签到信息实现
    @Select("select *  from  duty  where   dtdate=#{param2}  and  emprid=#{param1}")
    Duty  selectOne(String  emprid, Date  dtdate);

    //修改操作
    @Update("update  duty   set signoutTime=#{signoutTime}  where dtdate=#{dtDate} and  emprid=#{emprId}")
    int   update(Duty  duty);

    //按照条件查询考勤信息
    List<Duty>  selectMore(String  empid,String  deptno,String dtdate);
}
